package com.example.springdataelastci.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 测试类型
 *
 * @author heyangyang
 * @since 2023-11-03
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class BlogModel implements Serializable {

    private String id;

    private String title;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date time;

    public BlogModel(String id, String title, Date time) {
        this.id = id;
        this.title = title;
        this.time = time;
    }
}
